package routers

import (
	"github.com/astaxie/beego"
	"qycms/controllers/account"
	"qycms/controllers/adv"
	"qycms/controllers/article"
	"qycms/controllers/comment"
	"qycms/controllers/config"
	"qycms/controllers/index"
	"qycms/controllers/login"
	"qycms/controllers/member"
	"qycms/controllers/menu"
	"qycms/controllers/message"
	"qycms/controllers/role"
	"qycms/controllers/welcome"
)

func init() {
    //beego.Router("/", &controllers.MainController{})

	//后端路由
	//登录路由设置
	beego.Router("/sys/login", &login.LoginController{})
	//验证码刷新
	beego.Router("/sys/ChangeCaptcha", &login.LoginController{},"get:ChangeCaptcha")
    //登录验证操作
    beego.Router("/sys/doLogin",&login.LoginController{},"post:DoLogin")

    //后台主页面
    beego.Router("/sys/main",&index.IndexController{})
	beego.Router("/sys/welcome",&welcome.WelcomeController{})

	//用户管理
	beego.Router("/sys/user",&account.AccountController{},"get:Index")
	//用户数据列表数据
	beego.Router("/sys/UserList",&account.AccountController{},"post:UserList")
	//新建用户页面
	beego.Router("/sys/AddUserView",&account.AccountController{},"get:AddUserView")
	//新建用户操作
	beego.Router("/sys/AddUser",&account.AccountController{},"post:AddUser")
	//更新用户页面
	beego.Router("/sys/EditUserView",&account.AccountController{},"get:EditUserView")
	//更新用户操作
	beego.Router("/sys/UpdateUser",&account.AccountController{},"post:UpdateUser")
	//用户删除操作
	beego.Router("/sys/DelUser",&account.AccountController{},"post:DelUser")

    //角色管理
    beego.Router("/sys/role",&role.RoleController{},"get:Index")
	//角色数据
	beego.Router("/sys/RoleList",&role.RoleController{},"post:RoleList")
	//新建角色页面
	beego.Router("/sys/AddRoleView",&role.RoleController{},"get:AddRoleView")
	//新建角色
	beego.Router("/sys/AddRole",&role.RoleController{},"post:AddRole")
	//更新角色页面
	beego.Router("/sys/UpdateRoleView",&role.RoleController{},"get:UpdateRoleView")
	//更新角色
	beego.Router("/sys/UpdateRole",&role.RoleController{},"post:UpdateRole")
    //删除操作
	beego.Router("/sys/DelRole",&role.RoleController{},"post:DelRole")

	//广告管理
	//广告位管理数据
	beego.Router("/sys/cate",&adv.AdvController{},"get:Cate")
	//广告位管理数据
	beego.Router("/sys/CateList",&adv.AdvController{},"post:CateList")
    //新建广告位页面
	beego.Router("/sys/AddCateView",&adv.AdvController{},"get:AddCateView")
    //新建广告位操作
	beego.Router("/sys/AddCate",&adv.AdvController{},"post:AddCate")
	//更新广告位页面
	beego.Router("/sys/UpdateCateView",&adv.AdvController{},"get:UpdateCateView")
	//更新广告位操作
	beego.Router("/sys/UpdateCate",&adv.AdvController{},"post:UpdateCate")
	//删除广告位
	beego.Router("/sys/DelCate",&adv.AdvController{},"post:DelCate")

	//广告管理数据
	beego.Router("/sys/adv",&adv.AdvController{},"get:Index")
	//广告管理数据
	beego.Router("/sys/AdvList",&adv.AdvController{},"post:AdvList")
	//新建广告页面
	beego.Router("/sys/AddAdvView",&adv.AdvController{},"get:AddAdvView")
	//新建广告操作
	beego.Router("/sys/AddAdv",&adv.AdvController{},"post:AddAdv")
	//更新广告页面
	beego.Router("/sys/UpdateAdvView",&adv.AdvController{},"get:UpdateAdvView")
	//更新广告操作
	beego.Router("/sys/UpdateAdv",&adv.AdvController{},"post:UpdateAdv")
	//删除广告
	beego.Router("/sys/DelAdv",&adv.AdvController{},"post:DelAdv")

    //留言管理
    //留言主页面
    beego.Router("/sys/msg",&message.MsgController{},"get:Index")
    //留言页面数据列表
	beego.Router("/sys/MsgList",&message.MsgController{},"post:MsgList")
    //删除留言数据
	beego.Router("/sys/DelMsg",&message.MsgController{},"post:DelMsg")
	//回复留言
	beego.Router("/sys/Reply",&message.MsgController{},"post:Reply")

	//评论
	//评论主页面
	beego.Router("/sys/pl",&comment.CommentController{},"get:Index")
    //评论数据
	beego.Router("/sys/CommentList",&comment.CommentController{},"post:CommentList")
    //删除评论
	beego.Router("/sys/DelComment",&comment.CommentController{},"post:DelComment")

    //会员模块
    //分组
    beego.Router("/sys/hyfz",&member.MembersController{},"get:Index")
	beego.Router("/sys/glist",&member.MembersController{},"post:Glist")

	beego.Router("/sys/AddgView",&member.MembersController{},"get:AddgView")
	beego.Router("/sys/AddGroup",&member.MembersController{},"post:AddGroup")

	beego.Router("/sys/EditgView",&member.MembersController{},"get:EditgView")
	beego.Router("/sys/EditGroup",&member.MembersController{},"post:EditGroup")

	beego.Router("/sys/DelAction",&member.MembersController{},"post:DelAction")

	//会员
	beego.Router("/sys/member",&member.UserController{},"get:Index")
	beego.Router("/sys/memberList",&member.UserController{},"post:UserList")

	beego.Router("/sys/AddMemberView",&member.UserController{},"get:AddMemberView")
	beego.Router("/sys/AddMember",&member.UserController{},"post:AddMember")

	beego.Router("/sys/EditMemberView",&member.UserController{},"get:EditMemberView")
	beego.Router("/sys/UpdateMember",&member.UserController{},"post:UpdateMember")

	beego.Router("/sys/delMember",&member.UserController{},"post:DelMember")

	//栏目
	beego.Router("/sys/lm",&article.CateController{},"get:Cate")
	beego.Router("/sys/lmlist",&article.CateController{},"post:CateList")

	beego.Router("/sys/addlm",&article.CateController{},"get:AddCate")
	beego.Router("/sys/Insertlm",&article.CateController{},"post:InsertCate")

	beego.Router("/sys/Editlm",&article.CateController{},"get:EditCate")
	beego.Router("/sys/Updatelm",&article.CateController{},"post:UpdateCate")

	beego.Router("/sys/Delm",&article.CateController{},"post:DelAction")


	//文章
	beego.Router("/sys/new",&article.NewsController{},"get:Index")
	beego.Router("/sys/NewList",&article.NewsController{},"post:NewList")

	beego.Router("/sys/AddNews",&article.NewsController{},"get:AddNews")
	beego.Router("/sys/InsertNews",&article.NewsController{},"post:InsertNews")

	beego.Router("/sys/EditNews",&article.NewsController{},"get:EditNews")
	beego.Router("/sys/UpdateNew",&article.NewsController{},"post:UpdateNew")

	beego.Router("/sys/DelNew",&article.NewsController{},"post:DelNew")

	//配置
	beego.Router("/sys/set",&config.ConfigCotroller{},"get:Index")
	beego.Router("/sys/UpdateSet",&config.ConfigCotroller{},"post:UpdateSet")

	//菜单
	beego.Router("/sys/menu",&menu.MenuController{},"get:Index")
	beego.Router("/sys/MenuList",&menu.MenuController{},"get:MenuList")

	beego.Router("/sys/addMenu",&menu.MenuController{},"get:AddMenu")
	beego.Router("/sys/DoAddMenu",&menu.MenuController{},"post:DoAddMenu")

	beego.Router("/sys/EditMenu",&menu.MenuController{},"get:EditMenu")
	beego.Router("/sys/UpdatedMenu",&menu.MenuController{},"post:UpdatedMenu")

	beego.Router("/sys/DelMenu",&menu.MenuController{},"post:DelMenu")


}
